.class public Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;
.super Ljava/lang/Object;
.source "CleanMemoryUtil.java"


# static fields
.field private static final AUTO_BOOT_TRIGGER:[Ljava/lang/String;

.field private static final PROCFS_MEMFILE_FORMAT:Ljava/util/regex/Pattern;


# direct methods
.method static constructor <clinit>()V
    .registers 3

    .prologue
    .line 67
    const-string v0, "^([a-zA-Z]*):[ \t]*([0-9]*)[ \t]kB"

    invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v0

    sput-object v0, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->PROCFS_MEMFILE_FORMAT:Ljava/util/regex/Pattern;

    .line 318
    const/16 v0, 0xd

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "android.net.wifi.WIFI_STATE_CHANGED"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "android.net.conn.CONNECTIVITY_CHANGE"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "android.net.wifi.STATE_CHANGE"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "android.intent.action.MEDIA_EJECT"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    const-string v2, "android.intent.action.USER_PRESENT"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    const-string v2, "android.intent.action.PHONE_STATE"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string v2, "android.intent.action.PACKAGE_ADDED"

    aput-object v2, v0, v1

    const/4 v1, 0x7

    const-string v2, "android.intent.action.MEDIA_UNMOUNTED"

    aput-object v2, v0, v1

    const/16 v1, 0x8

    const-string v2, "android.intent.action.MEDIA_REMOVED"

    aput-object v2, v0, v1

    const/16 v1, 0x9

    const-string v2, "android.intent.action.MEDIA_CHECKING"

    aput-object v2, v0, v1

    const/16 v1, 0xa

    const-string v2, "android.intent.action.PACKAGE_REPLACED"

    aput-object v2, v0, v1

    const/16 v1, 0xb

    const-string v2, "android.intent.action.NEW_OUTGOING_CALL"

    aput-object v2, v0, v1

    const/16 v1, 0xc

    const-string v2, "android.bluetooth.adapter.action.STATE_CHANGED"

    aput-object v2, v0, v1

    sput-object v0, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->AUTO_BOOT_TRIGGER:[Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 39
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static changeItemState(Landroid/content/Context;Ljava/lang/String;Z)V
    .registers 23
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "packageName"    # Ljava/lang/String;
    .param p2, "enabled"    # Z

    .prologue
    .line 340
    const-string v18, "echo $LD_LIBRARY_PATH"

    invoke-static/range {v18 .. v18}, Lcom/zuiapps/suite/utils/shell/ShellUtil;->runRootCmd(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 341
    .local v2, "echoResult":Ljava/lang/String;
    new-instance v18, Ljava/lang/StringBuilder;

    invoke-direct/range {v18 .. v18}, Ljava/lang/StringBuilder;-><init>()V

    const-string v19, "export LD_LIBRARY_PATH="

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    const-string v19, ";"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 342
    .local v3, "exportStr":Ljava/lang/String;
    new-instance v18, Ljava/lang/StringBuilder;

    invoke-direct/range {v18 .. v18}, Ljava/lang/StringBuilder;-><init>()V

    const-string v19, "am force-stop "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

    move-object/from16 v1, p1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    const-string v19, ";"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 343
    .local v6, "forceStopStr":Ljava/lang/String;
    move-object v4, v3

    .line 344
    .local v4, "forbiddenCommand":Ljava/lang/String;
    if-nez p2, :cond_56

    .line 345
    new-instance v18, Ljava/lang/StringBuilder;

    invoke-direct/range {v18 .. v18}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, v18

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 347
    :cond_56
    if-eqz p2, :cond_c7

    const-string v14, "enable"

    .line 348
    .local v14, "pmCmd":Ljava/lang/String;
    :goto_5a
    if-eqz p2, :cond_ca

    const-string v16, "enabled"

    .line 349
    .local v16, "successRet":Ljava/lang/String;
    :goto_5e
    invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v13

    .line 350
    .local v13, "mPackageManager":Landroid/content/pm/PackageManager;
    new-instance v17, Ljava/util/LinkedList;

    invoke-direct/range {v17 .. v17}, Ljava/util/LinkedList;-><init>()V

    .line 352
    .local v17, "targetRecvs":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    const/4 v7, 0x0

    .local v7, "i":I
    sget-object v18, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->AUTO_BOOT_TRIGGER:[Ljava/lang/String;

    move-object/from16 v0, v18

    array-length v12, v0

    .local v12, "len":I
    :goto_6d
    if-ge v7, v12, :cond_d0

    .line 353
    new-instance v8, Landroid/content/Intent;

    invoke-direct {v8}, Landroid/content/Intent;-><init>()V

    .line 354
    .local v8, "intent":Landroid/content/Intent;
    move-object/from16 v0, p1

    invoke-virtual {v8, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 355
    sget-object v18, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->AUTO_BOOT_TRIGGER:[Ljava/lang/String;

    aget-object v18, v18, v7

    move-object/from16 v0, v18

    invoke-virtual {v8, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 356
    const/16 v18, 0x200

    move/from16 v0, v18

    invoke-virtual {v13, v8, v0}, Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v10

    .line 357
    .local v10, "items":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    if-eqz v10, :cond_97

    invoke-interface {v10}, Ljava/util/List;->isEmpty()Z

    move-result v18

    if-nez v18, :cond_97

    .line 358
    move-object/from16 v0, v17

    invoke-interface {v0, v10}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 360
    :cond_97
    const/4 v11, 0x0

    .local v11, "j":I
    :goto_98
    invoke-interface {v10}, Ljava/util/List;->size()I

    move-result v18

    move/from16 v0, v18

    if-ge v11, v0, :cond_cd

    .line 361
    new-instance v18, Ljava/lang/StringBuilder;

    invoke-direct/range {v18 .. v18}, Ljava/lang/StringBuilder;-><init>()V

    const-string v19, "changeItemSate result Audo Receivers :"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-interface {v10, v11}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v18

    check-cast v18, Landroid/content/pm/ResolveInfo;

    invoke-virtual/range {v18 .. v18}, Landroid/content/pm/ResolveInfo;->toString()Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v19

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v18 .. v18}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;)V

    .line 360
    add-int/lit8 v11, v11, 0x1

    goto :goto_98

    .line 347
    .end local v7    # "i":I
    .end local v8    # "intent":Landroid/content/Intent;
    .end local v10    # "items":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    .end local v11    # "j":I
    .end local v12    # "len":I
    .end local v13    # "mPackageManager":Landroid/content/pm/PackageManager;
    .end local v14    # "pmCmd":Ljava/lang/String;
    .end local v16    # "successRet":Ljava/lang/String;
    .end local v17    # "targetRecvs":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    :cond_c7
    const-string v14, "disable"

    goto :goto_5a

    .line 348
    .restart local v14    # "pmCmd":Ljava/lang/String;
    :cond_ca
    const-string v16, "disabled"

    goto :goto_5e

    .line 352
    .restart local v7    # "i":I
    .restart local v8    # "intent":Landroid/content/Intent;
    .restart local v10    # "items":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    .restart local v11    # "j":I
    .restart local v12    # "len":I
    .restart local v13    # "mPackageManager":Landroid/content/pm/PackageManager;
    .restart local v16    # "successRet":Ljava/lang/String;
    .restart local v17    # "targetRecvs":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    :cond_cd
    add-int/lit8 v7, v7, 0x1

    goto :goto_6d

    .line 364
    .end local v8    # "intent":Landroid/content/Intent;
    .end local v10    # "items":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    .end local v11    # "j":I
    :cond_d0
    new-instance v8, Landroid/content/Intent;

    invoke-direct {v8}, Landroid/content/Intent;-><init>()V

    .line 365
    .restart local v8    # "intent":Landroid/content/Intent;
    move-object/from16 v0, p1

    invoke-virtual {v8, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 366
    const-string v18, "android.intent.action.BOOT_COMPLETED"

    move-object/from16 v0, v18

    invoke-virtual {v8, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 367
    const/16 v18, 0x200

    move/from16 v0, v18

    invoke-virtual {v13, v8, v0}, Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v10

    .line 368
    .restart local v10    # "items":Ljava/util/List;, "Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    if-eqz v10, :cond_f6

    invoke-interface {v10}, Ljava/util/List;->isEmpty()Z

    move-result v18

    if-nez v18, :cond_f6

    .line 369
    move-object/from16 v0, v17

    invoke-interface {v0, v10}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 371
    :cond_f6
    const/4 v11, 0x0

    .restart local v11    # "j":I
    :goto_f7
    invoke-interface {v10}, Ljava/util/List;->size()I

    move-result v18

    move/from16 v0, v18

    if-ge v11, v0, :cond_126

    .line 372
    new-instance v18, Ljava/lang/StringBuilder;

    invoke-direct/range {v18 .. v18}, Ljava/lang/StringBuilder;-><init>()V

    const-string v19, "changeItemSate result Boot Receivers :"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-interface {v10, v11}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v18

    check-cast v18, Landroid/content/pm/ResolveInfo;

    invoke-virtual/range {v18 .. v18}, Landroid/content/pm/ResolveInfo;->toString()Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v19

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v18 .. v18}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;)V

    .line 371
    add-int/lit8 v11, v11, 0x1

    goto :goto_f7

    .line 374
    :cond_126
    invoke-interface/range {v17 .. v17}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v18

    :goto_12a
    invoke-interface/range {v18 .. v18}, Ljava/util/Iterator;->hasNext()Z

    move-result v19

    if-eqz v19, :cond_18b

    invoke-interface/range {v18 .. v18}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/content/pm/ResolveInfo;

    .line 375
    .local v9, "item":Landroid/content/pm/ResolveInfo;
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    .line 376
    .local v15, "sb":Ljava/lang/StringBuilder;
    const-string v19, "pm "

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 377
    invoke-virtual {v15, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 378
    const-string v19, " "

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 379
    const-string v19, "\'"

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 380
    move-object/from16 v0, p1

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 381
    const-string v19, "/"

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 382
    iget-object v0, v9, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 383
    const-string v19, "\';"

    move-object/from16 v0, v19

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 384
    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, v19

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    invoke-virtual {v0, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 385
    goto :goto_12a

    .line 386
    .end local v9    # "item":Landroid/content/pm/ResolveInfo;
    .end local v15    # "sb":Ljava/lang/StringBuilder;
    :cond_18b
    invoke-static {v4}, Lcom/zuiapps/suite/utils/shell/ShellUtil;->runRootCmd(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 387
    .local v5, "forbiddenResult":Ljava/lang/String;
    if-eqz v5, :cond_199

    move-object/from16 v0, v16

    invoke-virtual {v5, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v18

    if-eqz v18, :cond_199

    .line 392
    :cond_199
    return-void
.end method

.method private static checkRunningProcess(Landroid/content/Context;Ljava/lang/String;I)Z
    .registers 6
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "packageName"    # Ljava/lang/String;
    .param p2, "uid"    # I

    .prologue
    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 251
    const/16 v2, 0x2710

    if-ge p2, v2, :cond_7

    .line 269
    :cond_6
    :goto_6
    return v0

    .line 254
    :cond_7
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_13

    move v0, v1

    .line 255
    goto :goto_6

    .line 257
    :cond_13
    invoke-static {p1}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->isWhiteApp(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1b

    move v0, v1

    .line 258
    goto :goto_6

    .line 260
    :cond_1b
    invoke-static {p0}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->getLauncherPackageName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_27

    move v0, v1

    .line 261
    goto :goto_6

    .line 263
    :cond_27
    invoke-static {p0}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->getInputMethodPackageName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_33

    move v0, v1

    .line 264
    goto :goto_6

    .line 266
    :cond_33
    invoke-static {p1}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->isGoogleApp(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_6

    move v0, v1

    .line 267
    goto :goto_6
.end method

.method public static executeRunCommand(Landroid/content/Context;Ljava/lang/String;)V
    .registers 5
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "packageName"    # Ljava/lang/String;

    .prologue
    .line 335
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "am force-stop "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 336
    .local v0, "forceStopStr":Ljava/lang/String;
    invoke-static {v0}, Lcom/zuiapps/suite/utils/shell/ShellUtil;->runRootCmd(Ljava/lang/String;)Ljava/lang/String;

    .line 337
    return-void
.end method

.method public static getAvailMemory(Landroid/content/Context;)J
    .registers 5
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 45
    const-string v2, "activity"

    invoke-virtual {p0, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 46
    .local v0, "am":Landroid/app/ActivityManager;
    new-instance v1, Landroid/app/ActivityManager$MemoryInfo;

    invoke-direct {v1}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V

    .line 47
    .local v1, "mi":Landroid/app/ActivityManager$MemoryInfo;
    invoke-virtual {v0, v1}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V

    .line 48
    iget-wide v2, v1, Landroid/app/ActivityManager$MemoryInfo;->availMem:J

    return-wide v2
.end method

.method private static getInputMethodPackageName(Landroid/content/Context;)Ljava/lang/String;
    .registers 3
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 315
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "default_input_method"

    invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static getLauncherPackageName(Landroid/content/Context;)Ljava/lang/String;
    .registers 5
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 301
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 302
    .local v0, "intent":Landroid/content/Intent;
    const-string v2, "android.intent.category.HOME"

    invoke-virtual {v0, v2}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 303
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v2, v0, v3}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v1

    .line 304
    .local v1, "res":Landroid/content/pm/ResolveInfo;
    iget-object v2, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    if-nez v2, :cond_1c

    .line 305
    const-string v2, ""

    .line 310
    :goto_1b
    return-object v2

    .line 307
    :cond_1c
    iget-object v2, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v2, v2, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;

    const-string v3, "android"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2b

    .line 308
    const-string v2, ""

    goto :goto_1b

    .line 310
    :cond_2b
    iget-object v2, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    iget-object v2, v2, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;

    goto :goto_1b
.end method

.method public static getMemoryInfoByProcess(Landroid/content/Context;)Ljava/util/Map;
    .registers 16
    .param p0, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Landroid/os/Debug$MemoryInfo;",
            ">;>;"
        }
    .end annotation

    .prologue
    const/4 v12, 0x0

    .line 132
    const-string v11, "activity"

    invoke-virtual {p0, v11}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 133
    .local v0, "activityManager":Landroid/app/ActivityManager;
    new-instance v3, Landroid/app/ActivityManager$MemoryInfo;

    invoke-direct {v3}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V

    .line 134
    .local v3, "memoryInfo":Landroid/app/ActivityManager$MemoryInfo;
    invoke-virtual {v0, v3}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V

    .line 135
    invoke-virtual {v0}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object v10

    .line 136
    .local v10, "runningAppProcesses":Ljava/util/List;, "Ljava/util/List<Landroid/app/ActivityManager$RunningAppProcessInfo;>;"
    new-instance v7, Ljava/util/TreeMap;

    invoke-direct {v7}, Ljava/util/TreeMap;-><init>()V

    .line 137
    .local v7, "pidMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Integer;Ljava/lang/String;>;"
    invoke-interface {v10}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :goto_1e
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-eqz v13, :cond_36

    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/app/ActivityManager$RunningAppProcessInfo;

    .line 138
    .local v9, "runningAppProcessInfo":Landroid/app/ActivityManager$RunningAppProcessInfo;
    iget v13, v9, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    invoke-static {v13}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v13

    iget-object v14, v9, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    invoke-interface {v7, v13, v14}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_1e

    .line 141
    .end local v9    # "runningAppProcessInfo":Landroid/app/ActivityManager$RunningAppProcessInfo;
    :cond_36
    invoke-interface {v7}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v2

    .line 142
    .local v2, "keys":Ljava/util/Collection;, "Ljava/util/Collection<Ljava/lang/Integer;>;"
    new-instance v6, Ljava/util/HashMap;

    invoke-direct {v6}, Ljava/util/HashMap;-><init>()V

    .line 143
    .local v6, "memoryInfoMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Landroid/os/Debug$MemoryInfo;>;>;"
    invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v13

    :goto_43
    invoke-interface {v13}, Ljava/util/Iterator;->hasNext()Z

    move-result v11

    if-eqz v11, :cond_79

    invoke-interface {v13}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Ljava/lang/Integer;

    invoke-virtual {v11}, Ljava/lang/Integer;->intValue()I

    move-result v1

    .line 144
    .local v1, "key":I
    new-instance v5, Ljava/util/LinkedList;

    invoke-direct {v5}, Ljava/util/LinkedList;-><init>()V

    .line 145
    .local v5, "memoryInfoList":Ljava/util/List;, "Ljava/util/List<Landroid/os/Debug$MemoryInfo;>;"
    const/4 v11, 0x1

    new-array v11, v11, [I

    aput v1, v11, v12

    invoke-virtual {v0, v11}, Landroid/app/ActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;

    move-result-object v4

    .line 146
    .local v4, "memoryInfoArray":[Landroid/os/Debug$MemoryInfo;
    array-length v14, v4

    move v11, v12

    :goto_63
    if-ge v11, v14, :cond_6d

    aget-object v8, v4, v11

    .line 147
    .local v8, "pidMemoryInfo":Landroid/os/Debug$MemoryInfo;
    invoke-interface {v5, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 146
    add-int/lit8 v11, v11, 0x1

    goto :goto_63

    .line 149
    .end local v8    # "pidMemoryInfo":Landroid/os/Debug$MemoryInfo;
    :cond_6d
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v11

    invoke-interface {v7, v11}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v11

    invoke-interface {v6, v11, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_43

    .line 151
    .end local v1    # "key":I
    .end local v4    # "memoryInfoArray":[Landroid/os/Debug$MemoryInfo;
    .end local v5    # "memoryInfoList":Ljava/util/List;, "Ljava/util/List<Landroid/os/Debug$MemoryInfo;>;"
    :cond_79
    return-object v6
.end method

.method private static getPackageNameByProcess(Landroid/app/ActivityManager$RunningAppProcessInfo;)Ljava/lang/String;
    .registers 8
    .param p0, "paramRunningAppProcessInfo"    # Landroid/app/ActivityManager$RunningAppProcessInfo;

    .prologue
    .line 231
    iget-object v5, p0, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    .line 232
    .local v5, "processName":Ljava/lang/String;
    iget-object v3, p0, Landroid/app/ActivityManager$RunningAppProcessInfo;->pkgList:[Ljava/lang/String;

    .line 233
    .local v3, "pkgList":[Ljava/lang/String;
    const/4 v2, 0x0

    .line 234
    .local v2, "packageName":Ljava/lang/String;
    if-eqz v3, :cond_18

    .line 235
    array-length v1, v3

    .line 236
    .local v1, "len":I
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_9
    if-ge v0, v1, :cond_18

    .line 237
    aget-object v4, v3, v0

    .line 238
    .local v4, "pkgName":Ljava/lang/String;
    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_14

    .line 247
    .end local v0    # "i":I
    .end local v1    # "len":I
    .end local v4    # "pkgName":Ljava/lang/String;
    .end local v5    # "processName":Ljava/lang/String;
    :goto_13
    return-object v5

    .line 241
    .restart local v0    # "i":I
    .restart local v1    # "len":I
    .restart local v4    # "pkgName":Ljava/lang/String;
    .restart local v5    # "processName":Ljava/lang/String;
    :cond_14
    move-object v2, v4

    .line 236
    add-int/lit8 v0, v0, 0x1

    goto :goto_9

    .line 244
    .end local v0    # "i":I
    .end local v1    # "len":I
    .end local v4    # "pkgName":Ljava/lang/String;
    :cond_18
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-eqz v6, :cond_1f

    .line 245
    move-object v2, v5

    :cond_1f
    move-object v5, v2

    .line 247
    goto :goto_13
.end method

.method public static getRunningTaskList(Landroid/content/Context;)Ljava/util/List;
    .registers 19
    .param p0, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/List",
            "<",
            "Lcom/zuiapps/suite/utils/memory/ProcessItem;",
            ">;"
        }
    .end annotation

    .prologue
    .line 155
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v8

    .line 156
    .local v8, "mTimeStart":J
    new-instance v5, Ljava/util/LinkedHashMap;

    invoke-direct {v5}, Ljava/util/LinkedHashMap;-><init>()V

    .line 157
    .local v5, "mProcessMap":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Lcom/zuiapps/suite/utils/memory/ProcessItem;>;"
    const-string v13, "activity"

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/app/ActivityManager;

    .line 158
    .local v4, "mAm":Landroid/app/ActivityManager;
    new-instance v6, Ljava/util/ArrayList;

    invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V

    .line 159
    .local v6, "mSelectedProcessList":Ljava/util/List;, "Ljava/util/List<Lcom/zuiapps/suite/utils/memory/ProcessItem;>;"
    invoke-virtual {v4}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object v11

    .line 160
    .local v11, "runProcessList":Ljava/util/List;, "Ljava/util/List<Landroid/app/ActivityManager$RunningAppProcessInfo;>;"
    if-nez v11, :cond_1f

    .line 211
    :cond_1e
    return-object v6

    .line 163
    :cond_1f
    invoke-interface {v11}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v13

    :cond_23
    :goto_23
    invoke-interface {v13}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_70

    invoke-interface {v13}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/ActivityManager$RunningAppProcessInfo;

    .line 164
    .local v2, "amProcess":Landroid/app/ActivityManager$RunningAppProcessInfo;
    invoke-static {v2}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->getPackageNameByProcess(Landroid/app/ActivityManager$RunningAppProcessInfo;)Ljava/lang/String;

    move-result-object v7

    .line 165
    .local v7, "pkgName":Ljava/lang/String;
    invoke-virtual {v5, v7}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;

    .line 166
    .local v10, "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    if-nez v10, :cond_23

    .line 167
    iget v14, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->uid:I

    move-object/from16 v0, p0

    invoke-static {v0, v7, v14}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->checkRunningProcess(Landroid/content/Context;Ljava/lang/String;I)Z

    move-result v14

    if-eqz v14, :cond_23

    .line 171
    new-instance v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;

    .end local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    invoke-direct {v10}, Lcom/zuiapps/suite/utils/memory/ProcessItem;-><init>()V

    .line 173
    .restart local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    iget-object v14, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    invoke-virtual {v10, v7, v14, v2}, Lcom/zuiapps/suite/utils/memory/ProcessItem;->init(Ljava/lang/String;Ljava/lang/String;Landroid/app/ActivityManager$RunningAppProcessInfo;)V

    .line 174
    move-object/from16 v0, p0

    invoke-static {v0, v7}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->isSystemApp(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v14

    iput-boolean v14, v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mIsSys:Z

    .line 175
    invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v14, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_64

    .line 176
    const/4 v14, 0x1

    iput-boolean v14, v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mIsSelf:Z

    .line 178
    :cond_64
    iget v14, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    invoke-virtual {v10, v14}, Lcom/zuiapps/suite/utils/memory/ProcessItem;->addPid(I)V

    .line 179
    invoke-virtual {v5, v7, v10}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 180
    invoke-interface {v6, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_23

    .line 184
    .end local v2    # "amProcess":Landroid/app/ActivityManager$RunningAppProcessInfo;
    .end local v7    # "pkgName":Ljava/lang/String;
    .end local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    :cond_70
    const/16 v13, 0x96

    invoke-virtual {v4, v13}, Landroid/app/ActivityManager;->getRunningServices(I)Ljava/util/List;

    move-result-object v12

    .line 186
    .local v12, "runServiceList":Ljava/util/List;, "Ljava/util/List<Landroid/app/ActivityManager$RunningServiceInfo;>;"
    if-eqz v12, :cond_1e

    .line 187
    invoke-interface {v12}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v13

    :cond_7c
    :goto_7c
    invoke-interface {v13}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_1e

    invoke-interface {v13}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/app/ActivityManager$RunningServiceInfo;

    .line 188
    .local v3, "amService":Landroid/app/ActivityManager$RunningServiceInfo;
    iget-boolean v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->started:Z

    if-eqz v14, :cond_7c

    iget-wide v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->restarting:J

    const-wide/16 v16, 0x0

    cmp-long v14, v14, v16

    if-gtz v14, :cond_7c

    .line 192
    iget-object v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->service:Landroid/content/ComponentName;

    invoke-virtual {v14}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v7

    .line 193
    .restart local v7    # "pkgName":Ljava/lang/String;
    invoke-virtual {v5, v7}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;

    .line 194
    .restart local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    if-nez v10, :cond_7c

    .line 196
    iget v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->uid:I

    move-object/from16 v0, p0

    invoke-static {v0, v7, v14}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->checkRunningProcess(Landroid/content/Context;Ljava/lang/String;I)Z

    move-result v14

    if-eqz v14, :cond_7c

    .line 200
    new-instance v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;

    .end local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    invoke-direct {v10}, Lcom/zuiapps/suite/utils/memory/ProcessItem;-><init>()V

    .line 202
    .restart local v10    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    iget-object v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->process:Ljava/lang/String;

    invoke-virtual {v10, v7, v14, v3}, Lcom/zuiapps/suite/utils/memory/ProcessItem;->init(Ljava/lang/String;Ljava/lang/String;Landroid/app/ActivityManager$RunningServiceInfo;)V

    .line 203
    move-object/from16 v0, p0

    invoke-static {v0, v7}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->isSystemApp(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v14

    iput-boolean v14, v10, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mIsSys:Z

    .line 204
    iget v14, v3, Landroid/app/ActivityManager$RunningServiceInfo;->pid:I

    invoke-virtual {v10, v14}, Lcom/zuiapps/suite/utils/memory/ProcessItem;->addPid(I)V

    .line 205
    invoke-virtual {v5, v7, v10}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 206
    invoke-interface {v6, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_7c
.end method

.method public static getTotalMemory(Landroid/content/Context;)J
    .registers 3
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 52
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x10

    if-lt v0, v1, :cond_b

    .line 53
    invoke-static {p0}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->getTotalMemoryForHigherThan16(Landroid/content/Context;)J

    move-result-wide v0

    .line 55
    :goto_a
    return-wide v0

    :cond_b
    invoke-static {}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->getTotalMemoryForLessThan16()J

    move-result-wide v0

    goto :goto_a
.end method

.method public static getTotalMemoryForHigherThan16(Landroid/content/Context;)J
    .registers 5
    .param p0, "context"    # Landroid/content/Context;
    .annotation build Landroid/annotation/TargetApi;
        value = 0x10
    .end annotation

    .prologue
    .line 61
    const-string v2, "activity"

    invoke-virtual {p0, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 62
    .local v0, "am":Landroid/app/ActivityManager;
    new-instance v1, Landroid/app/ActivityManager$MemoryInfo;

    invoke-direct {v1}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V

    .line 63
    .local v1, "mi":Landroid/app/ActivityManager$MemoryInfo;
    invoke-virtual {v0, v1}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V

    .line 64
    iget-wide v2, v1, Landroid/app/ActivityManager$MemoryInfo;->totalMem:J

    return-wide v2
.end method

.method public static getTotalMemoryForLessThan16()J
    .registers 9

    .prologue
    const-wide/16 v6, 0x0

    .line 73
    :try_start_2
    new-instance v1, Ljava/io/FileReader;

    const-string v5, "/proc/meminfo"

    invoke-direct {v1, v5}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V

    .line 74
    .local v1, "fReader":Ljava/io/FileReader;
    new-instance v2, Ljava/io/BufferedReader;

    invoke-direct {v2, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_e
    .catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_e} :catch_41

    .line 80
    .local v2, "in":Ljava/io/BufferedReader;
    :try_start_e
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v4

    .line 81
    .local v4, "str":Ljava/lang/String;
    :goto_12
    if-eqz v4, :cond_48

    .line 82
    sget-object v5, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->PROCFS_MEMFILE_FORMAT:Ljava/util/regex/Pattern;

    invoke-virtual {v5, v4}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v3

    .line 83
    .local v3, "mat":Ljava/util/regex/Matcher;
    invoke-virtual {v3}, Ljava/util/regex/Matcher;->find()Z

    move-result v5

    if-eqz v5, :cond_43

    .line 84
    const/4 v5, 0x1

    invoke-virtual {v3, v5}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v5

    const-string v8, "MemTotal"

    invoke-virtual {v5, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_43

    .line 85
    const/4 v5, 0x2

    invoke-virtual {v3, v5}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
    :try_end_35
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_35} :catch_55
    .catchall {:try_start_e .. :try_end_35} :catchall_63

    move-result-wide v6

    .line 94
    if-eqz v1, :cond_3b

    .line 95
    :try_start_38
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_6f

    .line 98
    :cond_3b
    if-eqz v2, :cond_40

    .line 99
    :try_start_3d
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_40
    .catch Ljava/io/IOException; {:try_start_3d .. :try_end_40} :catch_71

    .line 106
    .end local v2    # "in":Ljava/io/BufferedReader;
    .end local v3    # "mat":Ljava/util/regex/Matcher;
    .end local v4    # "str":Ljava/lang/String;
    :cond_40
    :goto_40
    return-wide v6

    .line 75
    :catch_41
    move-exception v0

    .line 76
    .local v0, "f":Ljava/io/FileNotFoundException;
    goto :goto_40

    .line 88
    .end local v0    # "f":Ljava/io/FileNotFoundException;
    .restart local v2    # "in":Ljava/io/BufferedReader;
    .restart local v3    # "mat":Ljava/util/regex/Matcher;
    .restart local v4    # "str":Ljava/lang/String;
    :cond_43
    :try_start_43
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
    :try_end_46
    .catch Ljava/io/IOException; {:try_start_43 .. :try_end_46} :catch_55
    .catchall {:try_start_43 .. :try_end_46} :catchall_63

    move-result-object v4

    goto :goto_12

    .line 94
    .end local v3    # "mat":Ljava/util/regex/Matcher;
    :cond_48
    if-eqz v1, :cond_4d

    .line 95
    :try_start_4a
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V
    :try_end_4d
    .catch Ljava/io/IOException; {:try_start_4a .. :try_end_4d} :catch_73

    .line 98
    :cond_4d
    if-eqz v2, :cond_40

    .line 99
    :try_start_4f
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_52
    .catch Ljava/io/IOException; {:try_start_4f .. :try_end_52} :catch_53

    goto :goto_40

    .line 101
    :catch_53
    move-exception v5

    goto :goto_40

    .line 90
    .end local v4    # "str":Ljava/lang/String;
    :catch_55
    move-exception v5

    .line 94
    if-eqz v1, :cond_5b

    .line 95
    :try_start_58
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V
    :try_end_5b
    .catch Ljava/io/IOException; {:try_start_58 .. :try_end_5b} :catch_75

    .line 98
    :cond_5b
    if-eqz v2, :cond_40

    .line 99
    :try_start_5d
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_60
    .catch Ljava/io/IOException; {:try_start_5d .. :try_end_60} :catch_61

    goto :goto_40

    .line 101
    :catch_61
    move-exception v5

    goto :goto_40

    .line 93
    :catchall_63
    move-exception v5

    .line 94
    if-eqz v1, :cond_69

    .line 95
    :try_start_66
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V
    :try_end_69
    .catch Ljava/io/IOException; {:try_start_66 .. :try_end_69} :catch_77

    .line 98
    :cond_69
    if-eqz v2, :cond_6e

    .line 99
    :try_start_6b
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_6e
    .catch Ljava/io/IOException; {:try_start_6b .. :try_end_6e} :catch_79

    .line 104
    :cond_6e
    :goto_6e
    throw v5

    .line 103
    .restart local v3    # "mat":Ljava/util/regex/Matcher;
    .restart local v4    # "str":Ljava/lang/String;
    :catch_6f
    move-exception v5

    goto :goto_40

    .line 101
    :catch_71
    move-exception v5

    goto :goto_40

    .line 103
    .end local v3    # "mat":Ljava/util/regex/Matcher;
    :catch_73
    move-exception v5

    goto :goto_40

    .end local v4    # "str":Ljava/lang/String;
    :catch_75
    move-exception v5

    goto :goto_40

    :catch_77
    move-exception v6

    goto :goto_6e

    .line 101
    :catch_79
    move-exception v6

    goto :goto_6e
.end method

.method private static isGoogleApp(Ljava/lang/String;)Z
    .registers 8
    .param p0, "packageName"    # Ljava/lang/String;

    .prologue
    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 287
    const/4 v5, 0x3

    new-array v0, v5, [Ljava/lang/String;

    const-string v5, "com.google.android.gms"

    aput-object v5, v0, v4

    const-string v5, "com.google.android.gsf.login"

    aput-object v5, v0, v3

    const/4 v5, 0x2

    const-string v6, "com.google.android.gsf"

    aput-object v6, v0, v5

    .line 292
    .local v0, "googleApps":[Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    array-length v2, v0

    .local v2, "len":I
    :goto_14
    if-ge v1, v2, :cond_22

    .line 293
    aget-object v5, v0, v1

    invoke-virtual {p0, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1f

    .line 297
    :goto_1e
    return v3

    .line 292
    :cond_1f
    add-int/lit8 v1, v1, 0x1

    goto :goto_14

    :cond_22
    move v3, v4

    .line 297
    goto :goto_1e
.end method

.method public static isSystemApp(I)Z
    .registers 2
    .param p0, "appInfoFlags"    # I

    .prologue
    .line 216
    and-int/lit8 v0, p0, 0x1

    if-eqz v0, :cond_6

    const/4 v0, 0x1

    :goto_5
    return v0

    :cond_6
    const/4 v0, 0x0

    goto :goto_5
.end method

.method public static isSystemApp(Landroid/content/Context;Ljava/lang/String;)Z
    .registers 5
    .param p0, "cxt"    # Landroid/content/Context;
    .param p1, "pkgName"    # Ljava/lang/String;

    .prologue
    .line 220
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    .line 222
    .local v1, "pm":Landroid/content/pm/PackageManager;
    const/4 v2, 0x0

    :try_start_5
    invoke-virtual {v1, p1, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v0

    .line 223
    .local v0, "ai":Landroid/content/pm/ApplicationInfo;
    iget v2, v0, Landroid/content/pm/ApplicationInfo;->flags:I

    invoke-static {v2}, Lcom/zuiapps/suite/utils/memory/CleanMemoryUtil;->isSystemApp(I)Z
    :try_end_e
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_5 .. :try_end_e} :catch_10

    move-result v2

    .line 227
    .end local v0    # "ai":Landroid/content/pm/ApplicationInfo;
    :goto_f
    return v2

    .line 224
    :catch_10
    move-exception v2

    .line 227
    const/4 v2, 0x1

    goto :goto_f
.end method

.method private static isWhiteApp(Ljava/lang/String;)Z
    .registers 8
    .param p0, "packageName"    # Ljava/lang/String;

    .prologue
    .line 274
    const/4 v5, 0x6

    new-array v4, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    const-string v6, "com.android.providers."

    aput-object v6, v4, v5

    const/4 v5, 0x1

    const-string v6, "system"

    aput-object v6, v4, v5

    const/4 v5, 0x2

    const-string v6, "com.android.phone"

    aput-object v6, v4, v5

    const/4 v5, 0x3

    const-string v6, "android"

    aput-object v6, v4, v5

    const/4 v5, 0x4

    const-string v6, "com.android.systemui"

    aput-object v6, v4, v5

    const/4 v5, 0x5

    const-string v6, "com.baidu.easyroot"

    aput-object v6, v4, v5

    .line 275
    .local v4, "whiteApps":[Ljava/lang/String;
    array-length v2, v4

    .line 276
    .local v2, "len":I
    const/4 v1, 0x0

    .line 277
    .local v1, "isWhiteApp":Z
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_24
    if-ge v0, v2, :cond_40

    .line 278
    aget-object v3, v4, v0

    .line 279
    .local v3, "str":Ljava/lang/String;
    invoke-virtual {p0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_3c

    const-string v5, "."

    invoke-virtual {v3, v5}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_3d

    invoke-virtual {p0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_3d

    .line 280
    :cond_3c
    const/4 v1, 0x1

    .line 277
    :cond_3d
    add-int/lit8 v0, v0, 0x1

    goto :goto_24

    .line 283
    .end local v3    # "str":Ljava/lang/String;
    :cond_40
    return v1
.end method

.method public static killProcessesAsync(Landroid/content/Context;Ljava/util/List;)I
    .registers 11
    .param p0, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/zuiapps/suite/utils/memory/ProcessItem;",
            ">;)I"
        }
    .end annotation

    .prologue
    .line 110
    .local p1, "list":Ljava/util/List;, "Ljava/util/List<Lcom/zuiapps/suite/utils/memory/ProcessItem;>;"
    const/4 v1, 0x0

    .line 111
    .local v1, "count":I
    const-string v6, "activity"

    invoke-virtual {p0, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 112
    .local v0, "am":Landroid/app/ActivityManager;
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :cond_d
    :goto_d
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_77

    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;

    .line 114
    .local v5, "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    iget-boolean v7, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mIsSys:Z

    if-nez v7, :cond_d

    iget-boolean v7, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mIsSelf:Z

    if-nez v7, :cond_d

    .line 115
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v4

    .line 117
    .local v4, "pm":Landroid/content/pm/PackageManager;
    :try_start_25
    iget-object v7, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mPackageName:Ljava/lang/String;

    const/4 v8, 0x0

    invoke-virtual {v4, v7, v8}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v3

    .line 118
    .local v3, "pi":Landroid/content/pm/PackageInfo;
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "MainActivity killProcessesAsync="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mPackageName:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ","

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mProcessName:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ","

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, v3, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    invoke-virtual {v4, v8}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;

    move-result-object v8

    invoke-interface {v8}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ","

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;)V
    :try_end_6a
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_25 .. :try_end_6a} :catch_72

    .line 123
    .end local v3    # "pi":Landroid/content/pm/PackageInfo;
    :goto_6a
    iget-object v7, v5, Lcom/zuiapps/suite/utils/memory/ProcessItem;->mPackageName:Ljava/lang/String;

    invoke-virtual {v0, v7}, Landroid/app/ActivityManager;->killBackgroundProcesses(Ljava/lang/String;)V

    .line 124
    add-int/lit8 v1, v1, 0x1

    goto :goto_d

    .line 119
    :catch_72
    move-exception v2

    .line 120
    .local v2, "e":Landroid/content/pm/PackageManager$NameNotFoundException;
    invoke-virtual {v2}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V

    goto :goto_6a

    .line 127
    .end local v2    # "e":Landroid/content/pm/PackageManager$NameNotFoundException;
    .end local v4    # "pm":Landroid/content/pm/PackageManager;
    .end local v5    # "process":Lcom/zuiapps/suite/utils/memory/ProcessItem;
    :cond_77
    const-wide/16 v6, 0x12c

    invoke-static {v6, v7}, Landroid/os/SystemClock;->sleep(J)V

    .line 128
    return v1
.end method
